package StudyCode.summary.myfile;

import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CreateTemporaryFileSetDefaultDirectory {
	public static void main(String[] args) {
		Path basedir = FileSystems.getDefault().getPath("E:/Copy/");
		String tmp_file_prefix = "test_";
		String tmp_file_sufix = ".txt";

		try {
			Path tmp_3 = Files.createTempFile(basedir, tmp_file_prefix,
					tmp_file_sufix);
			System.out.println("临时文件: " + tmp_3.toString());
		} catch (IOException e) {
			System.err.println(e);
		}

	}
}
